package com.wu.leftrotatestring;

/**
 * 左旋转字符串
 * @author lynn
 * @date 2020/8/16 - 14:19
 */
public class Solution {
    public String LeftRotateString(String str, int n) {
        if (str == null || str.equals("")) {
            return "";
        }
        StringBuilder builder = new StringBuilder();
        String str1 = str.substring(0, n);
        String str2 = str.substring(n);
        String s = builder.append(str2).append(str1).toString();
        return s;
    }
}